<?php
use App\User;

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

// Route::get('/', function () {
//     return view('welcome');
// });

Route::match(['get', 'post'], 'maker/candidate', ['as' => 'candidate', 'uses' => 'MakerController@candidate']);
Route::match(['get', 'post'], 'allproject/search', ['as' => 'search', 'uses' => 'AllProjectController@search']);
Route::match(['get', 'post'], 'ztc/search', ['as' => 'search', 'uses' => 'ZtcController@search']);
Route::match(['get', 'post'], 'user/search', ['as' => 'search', 'uses' => 'UserController@search']);
Route::match(['get', 'post'], 'maker/search', ['as' => 'search', 'uses' => 'MakerController@search']);
Route::match(['get', 'post'], 'institution/search', ['as' => 'search', 'uses' => 'InstitutionController@search']);
Route::match(['get', 'post'], 'zone/search', ['as' => 'search', 'uses' => 'ZoneController@search']);
Route::match(['get', 'post'], 'activity/search', ['as' => 'search', 'uses' => 'ActivityController@search']);
Route::match(['get', 'post'], 'project/search', ['as' => 'search', 'uses' => 'ProjectController@search']);
Route::match(['get', 'post'], 'projectdeliver/search', ['as' => 'search', 'uses' => 'ProjectDeliverController@search']);
Route::match(['get', 'post'], 'roadshowapply/search', ['as' => 'search', 'uses' => 'RoadShowApplyController@search']);
Route::match(['get', 'post'], 'activityapply/search', ['as' => 'search', 'uses' => 'ActivityApplyController@search']);
Route::match(['get', 'post'], 'activityquestion/search', ['as' => 'search', 'uses' => 'ActivityQuestionController@search']);
Route::match(['get', 'post'], 'activityprojectvideo/search', ['as' => 'search', 'uses' => 'ActivityProjectVideoController@search']);
Route::match(['get', 'post'], 'logsms/search', ['as' => 'search', 'uses' => 'LogSmsController@search']);
Route::match(['get', 'post'], 'news/search', ['as' => 'search', 'uses' => 'NewsController@search']);
Route::match(['get', 'post'], 'actwinners/search', ['as' => 'search', 'uses' => 'ActWinnersController@search']);
Route::match(['get', 'post'], 'user/apply-search', ['as' => 'search', 'uses' => 'UserController@applySearch']);
Route::match(['get', 'post'], 'setting/search', ['as' => 'search', 'uses' => 'SettingController@search']);
Route::match(['get', 'post'], 'category/search', ['as' => 'search', 'uses' => 'CategoryController@search']);
Route::match(['get', 'post'], 'cache/search', ['as' => 'search', 'uses' => 'CacheController@search']);
Route::match(['get', 'post'], 'friendlink/search', ['as' => 'search', 'uses' => 'FriendLinkController@search']);
Route::match(['get', 'post'], 'recommend/rsearch', ['as' => 'rsearch', 'uses' => 'RecommendController@rSearch']);
Route::match(['get', 'post'], 'notice/search', ['as' => 'search', 'uses' => 'NoticeController@search']);
Route::match(['get', 'post'], 'ztcapply/search', ['as' => 'search', 'uses' => 'ZtcApplyController@search']);
Route::match(['get', 'post'], 'live/search', ['as' => 'search', 'uses' => 'LiveController@search']);
Route::match(['get', 'post'], 'ad/search', ['as' => 'search', 'uses' => 'AdController@search']);
Route::match(['get', 'post'], 'tag/search', ['as' => 'search', 'uses' => 'TagController@search']);
Route::match(['get', 'post'], 'mymessage/search', ['as' => 'search', 'uses' => 'MyMessageController@search']);
Route::match(['get', 'post'], 'topic/search', ['as' => 'search', 'uses' => 'TopicController@search']);
Route::match(['get', 'post'], 'smstemplate/search', ['as' => 'search', 'uses' => 'SmsTemplateController@search']);
Route::match(['get', 'post'], 'ztcuseapply/search', ['as' => 'search', 'uses' => 'ZtcUseApplyController@search']);
Route::match(['get', 'post'], 'game/search', ['as' => 'search', 'uses' => 'GameController@search']);
Route::match(['get', 'post'], 'gamewinners/search', ['as' => 'search', 'uses' => 'GameWinnersController@search']);
Route::match(['get', 'post'], 'citypartner/search', ['as' => 'search', 'uses' => 'CityPartnerController@search']);
Route::match(['get', 'post'], 'useraction/search', ['as' => 'search', 'uses' => 'UserActionController@search']);
Route::group(
    ['middleware' => ['auth']],
    function () {
// 	Route::controller('user', 'UserController');

// 	Route::get('home/{sid}',function($sid = 4){return $sid;
// 		$submodules = User::getPermissionNav(1);
// 		$controllers = User::getPermissionMenu($sid,1);
// 		return view('user.index')->with('controllers',$controllers)->with('submodules',$submodules);
// 	});
        Route::controller('home', 'HomeController');
        Route::controller('global', 'GlobalController');
        Route::controller('project', 'ProjectController');
        Route::controller('projectdeliver', 'ProjectDeliverController');
        Route::controller('user', 'UserController');
        Route::controller('role', 'RoleController');
        Route::controller('roleuser', 'RoleUserController');
        Route::controller('activity', 'ActivityController');
        Route::controller('upload', 'UploadController');
        Route::controller('ztc', 'ZtcController');
        Route::controller('ztcapply', 'ZtcApplyController');
        Route::controller('maker', 'MakerController');
        Route::controller('kindedit', 'KindeditController');
        Route::controller('zone', 'ZoneController');
        Route::controller('activityprojectvideo', 'ActivityProjectVideoController');
        Route::controller('activityapply', 'ActivityApplyController');
        Route::controller('activitytype', 'ActivityTypeController');
        Route::controller('roadshowapply', 'RoadShowApplyController');
        Route::controller('newstype', 'NewsTypeController');
        Route::controller('news', 'NewsController');
        Route::controller('newerguider', 'NewerGuiderController');
        Route::controller('ad', 'AdController');
        Route::controller('allproject', 'AllProjectController');
        Route::controller('auditresult', 'AuditResultController');
        Route::controller('institution', 'InstitutionController');
        Route::controller('cache', 'CacheController');
        Route::controller('friendlink', 'FriendLinkController');
        Route::controller('recommend', 'RecommendController');
        Route::controller('category', 'CategoryController');
        Route::controller('setting', 'SettingController');
        Route::controller('articlepages', 'ArticlePagesController');
        Route::controller('admin', 'AdminController');
        Route::controller('notice', 'NoticeController');
        Route::controller('activityquestion', 'ActivityQuestionController');
        Route::controller('logsms', 'LogSmsController');
        Route::controller('game', 'GameController');
        Route::controller('gamegoods', 'GameGoodsController');
        Route::controller('gametype', 'GameTypeController');
        Route::controller('gamewinners', 'GameWinnersController');
        Route::controller('gamelist', 'GameListController');
        Route::controller('live', 'LiveController');
        Route::controller('activityvideocomment', 'ActivityVideoCommentController');
        Route::controller('activityphoto', 'ActivityPhotoController');
        Route::controller('userstatistic', 'UserStatisticController');
        Route::controller('useranalyze', 'UserAnalyzeController');
        Route::controller('projectstatistic', 'ProjectStatisticController');
        Route::controller('articlestatistic', 'ArticleStatisticController');
        Route::controller('ztcstatistic', 'ZtcStatisticController');
        Route::controller('activitystatistic', 'ActivityStatisticController');
        Route::controller('tag', 'TagController');
        Route::controller('mymessage', 'MyMessageController');
        Route::controller('sms', 'SmsController');
        Route::controller('smstemplate', 'SmsTemplateController');
        Route::controller('topic', 'TopicController');
        Route::controller('topiccomment', 'TopicCommentController');
        Route::controller('topicphoto', 'TopicPhotoController');
        Route::controller('topicpost', 'TopicPostController');
        Route::controller('ztcuseapply', 'ZtcUseApplyController');
        Route::controller('chatroom', 'ChatroomController');
        Route::controller('activitysign', 'ActivitySignController');
        Route::controller('ztccomment', 'ZtcCommentController');
        Route::controller('projectcomment', 'ProjectCommentController');
        Route::controller('linkstatistic', 'LinkStatisticController');
        Route::controller('buttonclick', 'ButtonClickController');
        Route::controller('livedefaultimage', 'LiveDefaultImageController');
        Route::controller('citypartner', 'CityPartnerController');
        Route::controller('useraction', 'UserActionController');
        Route::controller('plan', 'PlanController');


// 	Route::get('user/{sid}',function($sid){
// 		$submodules = User::getPermissionNav(1);
// 		$controllers = User::getPermissionMenu($sid,1);
// 		return view('user.index')->with('controllers',$controllers)->with('submodules',$submodules);
// 	});
    }
);


//天涯云助手路由
Route::match(['get', 'post'], 'equipment/search', ['as' => 'search', 'uses' => 'EquipmentController@search']);
Route::group(
    ['middleware' => ['auth']],
    function () {
        Route::controller('equipment', 'EquipmentController');
    }
);


Route::controller('auth', 'Auth\AuthController');

Route::controller('/', 'LoginController');






